<template>
  <div class="common-layout">
    <el-container>
      <el-header>
        <Headermenu />
      </el-header>
      <el-main>
        <Content />
      </el-main>
    </el-container>
  </div>
</template>
  

<script setup lang="ts">
import { getSum_max5 } from "@/request/cityserves";
import { storeToRefs } from "pinia";
import { menuStore } from "@/store/modules/menu";
const menulist = menuStore();
let { default_city } = storeToRefs(menulist);
onMounted(() => {
  if (!default_city.value) {
    setmenudata()
  }
})
const setmenudata =async () =>{
    var { data } =await getSum_max5();
    data[0].src_id = Math.floor(Math.random() * 8) + 1;
    menulist.default_city = data[0]
}
</script>

<style lang="scss" scoped>
* {
  padding: 0;
  margin: 0;
}
.el-container {
  //   background-color: aqua;
  height: 100vh;
  .el-header {
    height: 57px;
    // background-color: rgb(224, 127, 0);
  }
  .el-main {
    // margin-top: 18px;
    height: 90%;
    // background-color: rgb(219, 8, 8);
  }
}
</style>